package cn.caplike.demo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author LiKe
 * @version 1.0.0
 * @date 2020-02-05 11:06
 */
@SuppressWarnings("unused")
@Service
public class CustomService {
    private CustomProperties customProperties;

    @Autowired
    public void setCustomProperties(CustomProperties customProperties) {
        this.customProperties = customProperties;
    }

    public String sayHello(String name) {
        return String.format("This is %s speaking, my favourite kind of herb is %s.", name, customProperties.getHerb());
    }
}
